<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>briup-电子商务-首页</title>
    <base th:href="${#request.getScheme()+'://'+#request.getServerName()+':'+#request.getServerPort()+#request.getContextPath()+'/'}">
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <link rel="stylesheet" type="text/css" href="css/index.css">

    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" src="js/estore.js"></script>
</head>
<body>
<a href="#top" alt="回到顶部" class="toTop">
    <button class="btn btn-top"><span class="glyphicon glyphicon-chevron-up"></span></button>
</a>
<div class="top" id="top">
    <div class="herf" th:if="${session.user} ==null">
        <span><a  href="toLogin">登录</a></span>
        <span><a href="toRegister">注册</a></span>
    </div>
    <div class="herf" th:if="${session.user} !=null">
        <span>欢迎回来！  <a th:text="${session.user.nickName}"  href="toUserInfo" style="color: red;">李四</a></span>
        <span><a href="/toOrder">我的订单</a></span>
        <span><a href="/toCollect">我的收藏</a></span>
        <span><a href="/exit">退出</a></span>
    </div>
</div>

<div class="head">
    <div class="row clearfix">
        <div class="col-md-3 column">
            <img src="images/logo.png" class="logo">
        </div>
        <div class="col-md-6 column">
            <div class="input-group search">
                <input type="text" class="form-control" placeholder="请输入你要检索的商品名字" style="padding: 20px" id="searchShopName">
                <span class="input-group-btn">
						<button class="btn btn-search" type="button" onclick="searchShop()"><span
                                class="glyphicon glyphicon-search"></span></button>
					</span>
            </div>
        </div>
        <div class="col-md-3 column bag">
            <a href="shopCar.html" th:href="toShopCar">
                <button class="btn btn-estore">
                    <span class="glyphicon glyphicon-shopping-cart"></span>&nbsp;购物车
                </button>
            </a>
        </div>
    </div>

</div>
<div class="nav">
    <div class="type">商品分类</div>
    <div class="type-list hide">
        <ul class="list-group">
            <li th:each="category : ${application.categories}" class="list-group-item"><span th:text="${category.name}">一级分类</span>
                <ul class="list-group-item-item hide">
                    <li th:each="scategory: ${category.categories}"><a th:href="'toList?categoryId='+${scategory.id}" href="list.html"  th:text="${scategory.name}">二级分类</a></li>

                </ul>

            </li>


        </ul>
        <div class="box hide">
            <ul></ul>
        </div>
    </div>


</div>


<div class="body">
    <div class="row clearfix banner">
        <div class="carousel slide" id="carousel-292430">
            <div class="carousel-inner">
                <div class="item active">
                    <img alt="" src="images/index/index1.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/banner02.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/hot2.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index4.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index5.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index6.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index7.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index8.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index9.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index10.jpg"/>
                </div>
                <div class="item">
                    <img alt="" src="images/index/index11.jpg"/>
                </div>

            </div>
            <a class="left carousel-control" href="#carousel-292430" data-slide="prev"><span
                    class="glyphicon glyphicon-chevron-left"></span></a> <a class="right carousel-control"
                                                                            href="#carousel-292430"
                                                                            data-slide="next"><span
                class="glyphicon glyphicon-chevron-right"></span></a>
        </div>


    </div>
    <div class="find">
        <h3>杰普特价</h3>
    </div>
    <div class="row miaosha">
        <div class="col-md-3 column book" th:each="discount:${application.discountList}">
            <a href="viewShop.html" th:href="'toViewShop?shopId='+${discount.id}">
                <img src="images/book_index/book6.jpg" th:src="${discount.img}">
            </a>
            <p th:text="${discount.name}" class="name">商品名字</p>
            <p th:text="${'剩余库存:'+discount.stockNum}" class="stockNum">剩余库存</p>
            <div class="price">
                <span class="price-one" th:text="${'原价:'+discount.selling_price}">119.0</span><span class="price-two" th:text="${'特价:'+discount.discountPrice}">79.0</span>
            </div>
        </div>

    </div>
    <div th:if="${session.user!=null}">
        <div class="find">
            <h3>为你推荐</h3>
        </div>
        <div id="recommend">


            <ul>
                    <li th:each="shop:${recommendShops}">
                    <a href="viewShop.html" th:href="'toViewShop?shopId='+${shop.shop.id}">
                        <img src="images/index/r5.jpg" alt="平板电脑" th:src="${shop.shop.img}" th:alt="${shop.shop.name}"/>
                        <p class="name" th:text="${shop.shop.name}">华为平板 M6</p>
                        <p class="item_price" th:text="${shop.shop.selling_price+'元'}">1499元</p>
                        <p class="counter"th:text="${'累计成交:'+shop.shop.salesVolume}">猜你喜欢</p>
                        <p class="new" th:text="${shop.shop.store}">官方直营</p>
                        <div class="comment">
                            <p th:text="${shop.shop.info}">杰普精选</p>
                        </div>
                    </a>
                </li>
            </ul>
        </div>
    </div>
    <div class="find">
        <h3>发现好物</h3>
    </div>
    <div class="row book">
        <div th:each="shop: ${application.shops}" class="col-md-3 onebook">
            <a class="viewShop" th:href="'toViewShop?shopId='+${shop.id}" href="viewShop.html">
                <img src="images/book_index/book1.jpg" th:src="${shop.img}"/>
                <h4 th:text="${shop.name}">
                    JAVAEE轻量级框架
                </h4>
				<p th:text="${shop.info}">商品信息</p>
                <p th:text="${shop.selling_price+'元'}">45.00元</p>
            </a>
        </div>

    </div>

</div>
<div class="footer">
    <div class="row clearfix icons">
        <div class="col-md-3 column">
            <img src="images/icons/icon_1_17.png">
            品目繁多 愉悦购物
        </div>
        <div class="col-md-3 column">
            <img src="images/icons/icon_1_20.png">
            正品保障 天天低价
        </div>
        <div class="col-md-3 column">
            <img src="images/icons/icon_1_23.png">
            极速物流 特色定制
        </div>
        <div class="col-md-3 column">
            <img src="images/icons/icon_1_25.png">
            优质服务 以客为尊
        </div>
    </div>
    <div class="links">
        <p>
            <span>关于我们</span>|
            <span>联系我们</span>|
            <span>加我我们</span>|
            <span>友情链接</span>
        </p>
        <p>沪ICP备14033591号-8 杰普briup.com版权所有 杰普软件科技有限公司</p>

    </div>
</div>
</div>
</body>
<script type="text/javascript">
</script>
</html>
<div id="successAlert" class="alert alert-success fade show">
    <a href="#" class="close" data-dismiss="alert">&times;</a>
    <strong></strong>
</div>
<div id="errorAlert" class="alert alert-danger fade show">
    <a href="#" class="close" data-dismiss="alert">&times;</a>
    <strong></strong>
</div>